package com.education.welco.service;

import com.education.welco.pojo.PlatResourceShare;
import com.education.welco.pojo.PlatformResources;
import com.education.welco.pojo.vo.ShareSchoolVo;

import java.util.List;

/**
 * 平台资源共享 服务层
 *
 * @Author: liftsail
 * @Date: 2022-09-28
 * @Description: 不积跬步无以至千里
 */
public interface IPlatResourceShareService {

    /**
     * 查询平台资源共享信息
     *
     * @param id 平台资源共享ID
     * @return 平台资源共享信息
     */
    public PlatResourceShare selectPlatResourceShareById(Integer id);

    /**
     * 查询平台资源共享列表
     *
     * @param platResourceShare 平台资源共享信息
     * @return 平台资源共享集合
     */
    public List<PlatResourceShare> selectPlatResourceShareList(PlatResourceShare platResourceShare);

    /**
     * 新增平台资源共享
     *
     * @param platResourceShare 平台资源共享信息
     * @return 结果
     */
    public int insertPlatResourceShare(PlatResourceShare platResourceShare);

    /**
     * 修改平台资源共享
     *
     * @param platResourceShare 平台资源共享信息
     * @return 结果
     */
    public int updatePlatResourceShare(PlatResourceShare platResourceShare);

    /**
     * 删除平台资源共享信息
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deletePlatResourceShareByIds(String ids);

    public List<ShareSchoolVo> selectShareSchoolList();

    PlatResourceShare selectPlatResourceShareByShareIdAndResIdAndReceiveId(Integer sharerId, String resId, Integer receiverId);

    int updatePlatResourceShareByShareIdAndResIdAndReceiveId(PlatResourceShare platResourceSharecp);

    List<PlatResourceShare> selectPlatResourceShareByResIdAndisDelete(List<String> resIdList, boolean isDelete);

    List<PlatResourceShare> selectPlatResourceShareByShareIdAndResIdListAndReceiveId(Integer sharerId, List<String> resIdList, Integer receiverId);

    int batchUpdatePlatResourceShareByShareIdAndResIdListAndReceiveId(Integer sharerId, List<String> resIdListBefore, Integer receiverId, boolean isDelete);

    int batchInsertPlatResourceShareByShareIdAndResIdListAndReceiveId(Integer sharerId, List<String> resIdListUserNow, Integer receiverId, boolean isDelete);

    List<PlatformResources> selectShareSchoolResListBySharerId(Integer sharerId, Integer pageNum, Integer pageSize);

    List<PlatformResources> selectShareSchoolResListBySchoolId(Integer schoolId,Integer teaId, Integer pageNum, Integer pageSize);
}